﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace Manager
{
	public class Attribute
	{
		[XmlAttribute]
		public string Name { get; set; }
		[XmlAttribute]
		public string ShortName { get; set; }
		[XmlAttribute]
		public int Value { get; set; }

	}

	public class Stat : Attribute
	{
		public bool isMultiplier { get; private set; }
		public bool isAdder { get; private set; }
		public float ValueModifier { get; set; }
		
		private Stat() {
			isMultiplier = false;
			isAdder = false;
		}
		public static Stat createMultiplierStat(float value)
		{
			Stat stat=new Stat();
			stat.isMultiplier=true;
			stat.ValueModifier = value;
			return stat;
		}
		public static Stat createAdderStat(float value)
		{
			Stat stat = new Stat();
			stat.isAdder = true;
			stat.ValueModifier = value;
			return stat;
		}

		List<Attribute> atts;
		public void addAttributeBase(Attribute a)
		{
			atts.Add(a);
		}
		public void removeAttributeBase(Attribute a)
		{
			atts.Remove(a);
		}
	}
}
